home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 16287 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.6 KB

  1. Path: keats.ugrad.cs.ubc.ca!not-for-mail
  2. From: c2a192@ugrad.cs.ubc.ca (Kazimir Kylheku)
  3. Newsgroups: comp.lang.ada,comp.lang.c,comp.lang.c++,comp.edu
  4. Subject: Re: ANSI C and POSIX (was Re: C/C++ knocks the crap out of Ada)
  5. Date: 9 Apr 1996 20:06:41 -0700
  6. Organization: Computer Science, University of B.C., Vancouver, B.C., Canada
  7. Message-ID: <4kf8k1INN68b@keats.ugrad.cs.ubc.ca>
  8. References: <JSA.96Feb16135027@organon.com> <dewar.829051685@schonberg> <829066525snz@genesis.demon.co.uk> <dewar.829096975@schonberg>
  9. NNTP-Posting-Host: keats.ugrad.cs.ubc.ca
  10.  
  11. In article <dewar.829096975@schonberg>, Robert Dewar <dewar@cs.nyu.edu> wrote:
  12.  >Linux simply checks that the end of the buffer is in the memory area,
  13.  >which is not the check you would like to see. That's what I was talking
  14.  >about when I noted that this kind of uncertainty would not occur in
  15.  >a language with a reasonably complete type model.
  16.  
  17. Precisely. The kernel defends itself against making a faulty dereference that
  18. would trigger an exception, but will happily corrupt your valid data, unless
  19. stated buffer range sticks over into an unmapped page.
  20.  
  21.  >What exactly *is* the wording of the POSIX standard here (Lawrence, you
  22.  >must have it at hand, please quote it exactly). The interesting thing
  23.  >is to determine whether this definition says enough to make *any* use
  24.  >of read defined without appealing to "unwritten rules". I would guess
  25.  >not!
  26.  
  27. Unwritten rules, or paranoia. Take your pick! (Door #2 for me, please)
  28.  
  29. The standard is basically very good at telling you what the functions do.
  30.  
  31. BTW, I checked the Ada POSIX standard too, but that reads like a VCR manual
  32. from 1984.  ;)  heh
  33. -- 
  34.  
  35.